package com.service.impl;

import com.dao.UsersDao;
import com.domain.Users;
import com.service.UsersService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UsersServiceImpl implements UsersService {
    //引用类型自动注入@Autowired,@Resource
    @Resource
    private UsersDao usersDao;

    @Override
    public int addUsers(Users users) {
        int nums = usersDao.insertUsers(users);
        return nums;
    }

    @Override
    public List<Users> findUsers(String username,String addr) {
        return  usersDao.selectUsers(username,addr);
    }
}
